﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DAL;
using HomeStayWebCP.Models.BusinessObject;
namespace HomeStayWebCP.Models
{
    public class HomeStayTypeModel
    {
        public List<HomeStayType> GetHomeStayType()
        {
            HomeStayTypesDataModel model = new HomeStayTypesDataModel();
            return model.GetHomeStayType();

        }

        //get homestayType name and ID use to show detail of post
        public List<string> GetNameHomeStayTypeOfHouse(int postID)
        {
            HomeStayTypesDataModel model = new HomeStayTypesDataModel();
            List<string> listResult = new List<string>();
            List<Store_HomeStayType_GetNameHomeStayType_Result> l = model.GetNameHomeStayTypeOfHouse( postID);
            foreach (var i in l)
            {
                //HomeStayTypeInfoItem item = new HomeStayTypeInfoItem();
                //item.HomeStayTypeID = i.HomeStayTypeID;
                //item.HomeStayTypeName = i.HomeStayTypeName;
                listResult.Add(i.HomeStayTypeName);
            }
            return listResult;
        }
    }
   

}